#ifndef ERP_ERRNO_DEFINE_H
#define ERP_ERRNO_DEFINE_H

namespace erp {
namespace comm {
/*
 * 这里用来定义错误码
 *
 * 错误码分配表，总表：
 * 0x00001~0x80000		C2C[拍拍】、统一后台
 * 0x80001~0x8FFFF		ERP
 *
 * 分配注册表：
 * 0x80001~0x801FF		公共错误码
 * 0x80200~0x805FF		GIS系统错误码
 * 0x80600~0x80AFF		FCMS财务系统错误码
 * 0x80B00~0x811FF		云ERP系统错误码
 *
 *
 */

enum ERP_COMMON_ERRNO			//ERP公共错误码【0x80001~0x801FF】
{
	ERR_ERP_COMMON_SYSTEM = 0x80001,		//系统错误，操作失败【建议少用，尽量细化错误】
	ERR_ERP_COMMON_USER_UNLOGIN = 0x80002,		//用户或帐号未登录或登录鉴权失败
	ERR_ERP_COMMON_USER_FREEZED = 0x80003,		//用户或帐号被冻结
	ERR_ERP_COMMON_USER_FORBIDDEN = 0x80004,		//用户或帐号被禁止
	ERR_ERP_COMMON_PARAM_INVALID = 0x80005,		//参数错误【建议少用，尽量细化错误】
	ERR_ERP_COMMON_PARAM_TOO_LONG = 0x80005,		//参数过长【建议少用，尽量细化错误】
	ERR_ERP_COMMON_PARAM_TOO_SHORT = 0x80005,		//参数过短【建议少用，尽量细化错误】
	ERR_ERP_COMMON_PARAM_OUT_RANGE = 0x80005,		//参数超出取值范围【建议少用，尽量细化错误】
	ERR_ERP_COMMON_ITEM_NOT_EXIST = 0x80006,//数据项不存在【建议少用，尽量细化具体到什么业务的什么数据项不存在】
	ERR_ERP_COMMON_ITEM_STATE_DISMATCH = 0x8000D,//数据项状态不匹配【建议少用，尽量细化具体到什么业务的什么数据项什么状态不匹配】
	ERR_ERP_COMMON_NOT_AUTHORIZED = 0x80007,		//未授权的操作【建议少用，尽量细化具体到什么授权】
	ERR_ERP_COMMON_SIGNATURE_INVALID = 0x80008,		//签名无效【建议少用，尽量细化具体到什么签名】
	ERR_ERP_COMMON_PASSWORD_INVALID = 0x80009,		//密码无效
	ERR_ERP_COMMON_NOT_OWN_DATA = 0x8000A,		//操作非自己的数据
	ERR_ERP_COMMON_REQUEST_CHECK_INVALID = 0x8000B,	//非法请求数据包,主要是一些恶意漏洞攻击检查失败
	ERR_ERP_COMMON_OPERAT_OVER_LIMITATION = 0x8000C,		//请求过于频繁
	ERR_ERP_COMMON_SOURCE_INVALID = 0x8000D,		//请求源非法
	ERR_ERP_COMMON_MACHINEKEY_INVALID = 0x8000E,		//请求源机器码非法
	ERR_ERP_COMMON_SCENEID_INVALID = 0x8000F,		//请求源场景ID非法
	ERR_ERP_COMMON_COMPONENT_INIT_FAILED = 0x80010,	//组件初始化失败【建议少用，尽量细化具体到什么组件】
	ERR_ERP_COMMON_COMPONENT_OPERAT_FAILED = 0x80011,//组件初操作失败【建议少用，尽量细化具体到什么组件】
	ERR_ERP_COMMON_INTERFACE_ABANDONED = 0x80012,		//接口废弃
	ERR_ERP_COMMON_DB_SELECT_FAILED = 0x80013,		//数据查询失败
	ERR_ERP_COMMON_DB_UPDATE_FAILED = 0x80014,		//数据更新失败
	ERR_ERP_COMMON_DB_INSERT_FAILED = 0x80015,		//数据插入失败
	ERR_ERP_COMMON_DB_DELETE_FAILED = 0x80016,		//数据删除失败
	ERR_ERP_COMMON_DB_QUERY_FAILED = 0x80017,		//数据查询结果为空
	ERR_ERP_COMMON_DB_KEY_EXIST = 0x80018,		//数据项已存在
	ERR_ERP_COMMON_CONFIGCENTER_INIT_FAILED = 0x80019,		//配置中心初始化失败
	ERR_ERP_COMMON_CONFIGCENTER_GET_FAILED = 0x8001A,		//配置中心取数据失败
	ERR_ERP_COMMON_MSGQ_INIT_FAILED = 0x8001B,		//消息中间件初始化失败
	ERR_ERP_COMMON_MSGQ_SEND_FAILED = 0x8001C,		//消息发送失败
	ERR_ERP_COMMON_MSGQ_RECEIVE_FAILED = 0x8001D,		//消息接收失败
	ERR_ERP_COMMON_DAL_INIT_FAILED = 0x8001E,		//DAL初始化失败
	ERR_ERP_COMMON_DAL_CONNECT_FAILED = 0x8001F,		//DAL获取连接失败
	ERR_ERP_COMMON_CACHE_INIT_FAILED = 0x80020,		//cache初始化失败
	ERR_ERP_COMMON_CACHE_SET_FAILED = 0x80021,		//cache设置失败
	ERR_ERP_COMMON_CACHE_GET_FAILED = 0x80022,		//cache读取失败
	ERR_ERP_COMMON_CACHE_DEL_FAILED = 0x80023,		//cache删除失败
	ERR_ERP_COMMON_MODULE_INIT_FAILED = 0x80024,		//模调初始化失败
	ERR_ERP_COMMON_LOG_INIT_FAILED = 0x80025,		//日志初始化失败
	ERR_ERP_COMMON_DIRTY_FILT_FAILED = 0x80026,		//脏词过滤失败
	ERR_ERP_COMMON_DIRTY_MATCH = 0x80027,		//脏词命中
	ERR_ERP_COMMON_IDMAKER_GEN_FAILED = 0x80028,	//ID生成失败【建议少用，尽量细化具体到什么业务】
	ERR_ERP_COMMON_DB_AFFECTED_ZERO_FAILED = 0x80029,		//数据更新影响函数为0
};

enum ERP_GIS_ERRNO			//GIS系统错误码【0x80200~0x805FF】
{
	//employee
	ERR_ERP_EMPLOYEE_PAGESIZE = 0x80200,		//过滤的页面大小超出限制
	ERR_ERP_EMPLOYEE_ENGLISHNAMESIZE = 0x80201,		//员工英文名长度超出限制
	ERR_ERP_EMPLOYEE_NAMESIZE = 0x80202,		//员工姓名长度超出限制
	ERR_ERP_EMPLOYEE_SEX = 0x80203,		//员工性别超出取值
	ERR_ERP_EMPLOYEE_STATUS = 0x80204,		//员工状态超出取值
	ERR_ERP_EMPLOYEE_TYPE = 0x80205,		//员工类型超出取值
	ERR_ERP_EMPLOYEE_PROPERTY_OUTRANGE = 0x80206,		//员工类型超出取值
	ERR_ERP_EMPLOYEE_ORDERTYPE = 0x80207,		//排序超出取值

	// gis map gateway.
	ERR_ERP_GIS_GATEWAY_INPUT_INVALiD = 0x80301,
	ERR_ERP_GIS_GATEWAY_REQUEST_API_FAILED = 0x80302,
	ERR_ERP_GIS_GATEWAY_PARSE_FAILED = 0x80303,
	ERR_ERP_GIS_GATEWAY_JSON_OVERFLOW = 0x80304,
	ERR_ERP_GIS_GATEWAY_RESPONSE_INVALID = 0x80305,
	ERR_ERP_GIS_GATEWAY_REQUEST_LIMITATION = 0x80306,
	ERR_ERP_GIS_GATEWAY_RESULT_CHECK_FAILED = 0x80307,
	// gis core
	ERR_ERP_GISCORE_TRUST_LEVEL_NOT_FIT = 0x80308,
	ERR_ERP_GISCORE_ADDR_COORDINATE_NOT_FOUND = 0x80309,

	// dao gis erp
	ERR_ERP_DAOGISERP_LOCUS_RECORD_COUNT_EXCEED_MAX_VALUE = 0x80401,

};

enum ERP_FCMS_ERRNO			//FCMS财务系统错误码【0x80600~0x80AFF】
{
	//fiscalstock

	ERR_ERP_FCMS_xxxxx = 0x80600,		//财务系统的xx错误
	ERR_ERP_FCMS_FISCALSTOCK_NECESSARYITEM_LACK = 0x80601,//财务系统基础库-财务仓库的非空字段却没有给值.dao ao通用
	ERR_ERP_FCMS_FISCALSTOCKAREA_NECESSARYITEM_LACK = 0x80602,//财务系统基础库-财务仓库库区的非空字段却没有给值.dao ao通用
	ERR_ERP_FCMS_FISCALACCOUNTING_NECESSARYITEM_LACK = 0x80603,	//财务系统基础库-财务核算组织的非空字段却没有给值.dao ao通用
	ERR_ERP_FCMS_FISCALSTOCKMAP_NECESSARYITEM_LACK = 0x80604,//财务系统基础库-财务核算组织的非空字段却没有给值.dao ao通用
	ERR_ERP_FCMS_FISCALPERIOD_NECESSARYITEM_LACK = 0x80605,	//财务系统基础库-会计区间的非空字段却没有给值.dao ao通用

	ERR_ERP_FCMS_FISCALSTOCKTRANSACTIONTYPE_NECESSARYITEM_LACK = 0x80606,//财务系统基础库-财务仓库事务类型的非空字段却没有给值.dao ao通用
	ERR_ERP_FCMS_FISCALSTOCKBILLSTYPE_NECESSARYITEM_LACK = 0x80607,	//财务系统基础库-财务库存单据类型的非空字段却没有给值.dao ao通用
	ERR_ERP_FCMS_FISCALCOSTSOURCE_NECESSARYITEM_LACK = 0x80608,	//财务系统基础库-财务成本来源的非空字段却没有给值.dao ao通用
	ERR_ERP_FCMS_FISCALSTOCKFLOWTYPE_NECESSARYITEM_LACK = 0x80609,//财务系统基础库-财务库存流水类型的非空字段却没有给值.dao ao通用

	ERR_ERP_FCMS_IDMAKER_FAILED = 0x806E0,		//财务系统基础库-调用idmaker服务失败
	ERR_ERP_FCMS_GETDBOPERATOR_FAILED = 0x806E1, // 获取数据库连接失败:CDAL_SET->GetDBOperator()调用失败.未能获取数据库连接
	ERR_ERP_FCMS_CMYSQLSTORAGE_DB_FAILED = 0x806E1, //获取存储器失败:CMySqlStorage对象调用数据库操作失败

	//财务系统基础库:服务:fiscalstock-ao
	ERR_ERP_FCMS_AO_FISCALSTOCK_GET_NOITEM = 0x80605, //财务系统基础库-调用ao GetFiscalStock 方法,没有获取到数据项
	ERR_ERP_FCMS_AO_FISCALSTOCK_GET_FAILED = 0x80606, //财务系统基础库-调用ao GetFiscalStock 方法失败,GetFiscalStock
													  //和GetFiscalStockByCode方法通用
	ERR_ERP_FCMS_AO_FISCALSTOCK_ADD_FAILED = 0x80607, //财务系统基础库-调用ao AddFiscalStock 方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCK_DELETE_FAILED = 0x80608, //财务系统基础库-调用ao DeleteFiscalStock 方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCK_UPDATE_FAILED = 0x80609, //财务系统基础库-调用ao UpdateFiscalStock 方法失败

	ERR_ERP_FCMS_AO_FISCALSTOCKAREA_GET_NOITEM = 0x8060A, //财务系统基础库-调用ao GetFiscalStockArea 方法,没有获取到数据项
	ERR_ERP_FCMS_AO_FISCALSTOCKAREA_GET_FAILED = 0x8060B, //财务系统基础库-调用ao GetFiscalStockArea 方法失败,GetFiscalStockArea
														  //和GetFiscalStockAreaByCode方法通用
	ERR_ERP_FCMS_AO_FISCALSTOCKAREA_ADD_FAILED = 0x8060C, //财务系统基础库-调用ao AddFiscalStockArea 方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCKAREA_DELETE_FAILED = 0x8060D, //财务系统基础库-调用ao DeleteFiscalStockArea 方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCKAREA_UPDATE_FAILED = 0x8060E, //财务系统基础库-调用ao UpdateFiscalStockArea 方法失败

	ERR_ERP_FCMS_AO_FISCALSTOCKMAP_GET_NOITEM = 0x80615, //财务系统基础库-调用ao GetFiscalStockMap 方法,没有获取到数据项
	ERR_ERP_FCMS_AO_FISCALSTOCKMAP_GET_FAILED = 0x80616, //财务系统基础库-调用ao GetFiscalStockMap 方法失败,GetFiscalStockMap
														 //和GetFiscalStockMapByCode方法通用
	ERR_ERP_FCMS_AO_FISCALSTOCKMAP_ADD_FAILED = 0x80617, //财务系统基础库-调用ao AddFiscalStockMap 方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCKMAP_DELETE_FAILED = 0x80618, //财务系统基础库-调用ao DeleteFiscalStockMap 方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCKMAP_UPDATE_FAILED = 0x80619, //财务系统基础库-调用ao UpdateFiscalStockMap 方法失败

	ERR_ERP_FCMS_AO_FISCALACCOUNTING_GET_NOITEM = 0x8061A, //财务系统基础库-调用ao GetFiscalAccounting 方法,没有获取到数据项
	ERR_ERP_FCMS_AO_FISCALACCOUNTING_GET_FAILED = 0x8061B, //财务系统基础库-调用ao GetFiscalAccounting 方法失败,GetFiscalAccounting
														   //和GetFiscalAccountingByCode方法通用
	ERR_ERP_FCMS_AO_FISCALACCOUNTING_ADD_FAILED = 0x8061C, //财务系统基础库-调用ao AddFiscalAccounting 方法失败
	ERR_ERP_FCMS_AO_FISCALACCOUNTING_DELETE_FAILED = 0x8061D, //财务系统基础库-调用ao DeleteFiscalAccounting 方法失败
	ERR_ERP_FCMS_AO_FISCALACCOUNTING_UPDATE_FAILED = 0x8061E, //财务系统基础库-调用ao UpdateFiscalAccounting 方法失败

	ERR_ERP_FCMS_AO_FISCALPERIOD_GET_NOITEM = 0x8061F, //财务系统基础库-调用ao GetFiscalPeriod 方法,没有获取到数据项
	ERR_ERP_FCMS_AO_FISCALPERIOD_GET_FAILED = 0x80620, //财务系统基础库-调用ao GetFiscalPeriod 方法失败,GetFiscalPeriod
													   //和GetFiscalPeriodByCode方法通用
	ERR_ERP_FCMS_AO_FISCALPERIOD_ADD_FAILED = 0x80621, //财务系统基础库-调用ao AddFiscalPeriod 方法失败
	ERR_ERP_FCMS_AO_FISCALPERIOD_DELETE_FAILED = 0x80622, //财务系统基础库-调用ao DeleteFiscalPeriod方法失败
	ERR_ERP_FCMS_AO_FISCALPERIOD_UPDATE_FAILED = 0x80623, //财务系统基础库-调用ao UpdateFiscalPeriod 方法失败

	ERR_ERP_FCMS_AO_FISCALSTOCKTRANSACTIONTYPE_GET_NOITEM = 0x80624, //财务系统基础库-调用ao GetFiscalStockTransactionType 方法,没有获取到数据项
	ERR_ERP_FCMS_AO_FISCALSTOCKTRANSACTIONTYPE_GET_FAILED = 0x80625, //财务系统基础库-调用ao GetFiscalStockTransactionType 方法失败,GetFiscalStockTransactionType
													   //和GetFiscalStockTransactionTypeByCode方法通用
	ERR_ERP_FCMS_AO_FISCALSTOCKTRANSACTIONTYPE_ADD_FAILED = 0x80626, //财务系统基础库-调用ao AddFiscalStockTransactionType 方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCKTRANSACTIONTYPE_DELETE_FAILED = 0x80627, //财务系统基础库-调用ao DeleteFiscalStockTransactionType方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCKTRANSACTIONTYPE_UPDATE_FAILED = 0x80628, //财务系统基础库-调用ao UpdateFiscalStockTransactionType 方法失败

	ERR_ERP_FCMS_AO_FISCALCOSTSOURCE_GET_NOITEM = 0x80629, //财务系统基础库-调用ao GetFiscalCostSource 方法,没有获取到数据项
	ERR_ERP_FCMS_AO_FISCALCOSTSOURCE_GET_FAILED = 0x8062A, //财务系统基础库-调用ao GetFiscalCostSource 方法失败,GetFiscalCostSource
													   //和GetFiscalCostSourceByCode方法通用
	ERR_ERP_FCMS_AO_FISCALCOSTSOURCE_ADD_FAILED = 0x8062B, //财务系统基础库-调用ao AddFiscalCostSource 方法失败
	ERR_ERP_FCMS_AO_FISCALCOSTSOURCE_DELETE_FAILED = 0x8062C, //财务系统基础库-调用ao DeleteFiscalCostSource方法失败
	ERR_ERP_FCMS_AO_FISCALCOSTSOURCE_UPDATE_FAILED = 0x8062D, //财务系统基础库-调用ao UpdateFiscalCostSource 方法失败

	ERR_ERP_FCMS_AO_FISCALSTOCKBILLSTYPE_GET_NOITEM = 0x8062E, //财务系统基础库-调用ao GetFiscalStockBillsType 方法,没有获取到数据项
	ERR_ERP_FCMS_AO_FISCALSTOCKBILLSTYPE_GET_FAILED = 0x8062F, //财务系统基础库-调用ao GetFiscalStockBillsType 方法失败,GetFiscalStockBillsType
													   //和GetFiscalStockBillsTypeByCode方法通用
	ERR_ERP_FCMS_AO_FISCALSTOCKBILLSTYPE_ADD_FAILED = 0x80630, //财务系统基础库-调用ao AddFiscalStockBillsType 方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCKBILLSTYPE_DELETE_FAILED = 0x80631, //财务系统基础库-调用ao DeleteFiscalStockBillsType方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCKBILLSTYPE_UPDATE_FAILED = 0x80632, //财务系统基础库-调用ao UpdateFiscalStockBillsType 方法失败

	ERR_ERP_FCMS_AO_FISCALSTOCKFLOWTYPE_GET_NOITEM = 0x80633, //财务系统基础库-调用ao GetFiscalStockFlowType 方法,没有获取到数据项
	ERR_ERP_FCMS_AO_FISCALSTOCKFLOWTYPE_GET_FAILED = 0x80634, //财务系统基础库-调用ao GetFiscalStockFlowType 方法失败,GetFiscalStockFlowType
													   //和GetFiscalStockFlowTypeByCode方法通用
	ERR_ERP_FCMS_AO_FISCALSTOCKFLOWTYPE_ADD_FAILED = 0x80635, //财务系统基础库-调用ao AddFiscalStockFlowType 方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCKFLOWTYPE_DELETE_FAILED = 0x80636, //财务系统基础库-调用ao DeleteFiscalStockFlowType方法失败
	ERR_ERP_FCMS_AO_FISCALSTOCKFLOWTYPE_UPDATE_FAILED = 0x80637, //财务系统基础库-调用ao UpdateFiscalStockFlowType 方法失败


	ERR_ERP_FCMS_AO_SOOUTCOSTAO_IN_PO_LIST_NO_ITEM = 0x80637, //销售出库接口-po的list为空
	ERR_ERP_FCMS_AO_SOOUTCOSTAO_NECESSARYITEM_LACK = 0x80637, //销售出库接口-po的必填字段没填
	ERR_ERP_FCMS_AO_SOOUTCOSTAO_SALEMODE_JOINTSALE = 0x80637, //销售出库接口-销售模式为新联营
	ERR_ERP_FCMS_AO_SOOUTCOSTAO_FISCALPERIOD_CLOSED = 0x80637, //销售出库接口-会计期间关闭
	ERR_ERP_FCMS_AO_SOOUTCOSTAO_GET_FISCALPERIOD_FAILED = 0x80637, //销售出库接口-获取会计期间失败
	ERR_ERP_FCMS_AO_SOOUTCOSTAO_GET_FISCALPERIOD_NOITEM = 0x80637, //销售出库接口-获取会计期间,不存在该区间

};

enum ERP_YUN_ERRNO			//云ERP系统错误码【0x80B00~0x811FF】
{
	ERR_ERP_YUN_STRING_EMPTYORNULL = 0x80B00, //云ERP 字符串为空错误码
	ERR_ERP_YUN_STRING_PAGESIZE = 0x80B01, //云ERP 过滤的页面大小超出限制
	ERR_ERP_YUN_ORDERTYPE = 0x80B02,		//云ERP 排序超出取值
	ERR_ERP_YUN_MAKEID_FAILED = 0x80B03, //云ERP 申请Make ID失败
	ERR_ERP_YUN_NAMESIZE_OVERFLOW = 0x80B04, //云ERP 名称越界溢出
	ERR_ERP_YUN_NAMESIZE_LESSLENGTH = 0x80B05, //云ERP 名称越界溢出
};

}
}

#endif
